package br.jm.beans;

import java.io.Serializable;
import java.util.Date;

import javax.faces.bean.SessionScoped;
import javax.inject.Inject;
import javax.inject.Named;

import br.jm.i18n.Holder;

@Named("locHelloBean")
@SessionScoped
public class LocalizedHelloBean implements Serializable {

	public interface Messages {

		String getTitle();

		String getButtonText();

		String getSalutation(final Object... args);

	}

	private static final long serialVersionUID = 1L;

	Messages messages;

	public Messages getMessages() {
		return messages;
	}

	public Date now() {
		return new Date();
	}

	@Inject
	public void setI18Messages(/* @I18NResource */final Holder<Messages> h) {
		messages = h.getRef();
	}
}